package com.wiki.utils.commonRequest.user;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserResetPasswordReq {

    /**
     * ID
     */
    private Long id;

    /**
     * 密码
     */
    @NotEmpty(message = "密码不能为空")
//    @Length(min = 6,max = 20,message = "密码长度为6-20位")
    @Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,32}$",
            message = "密码至少包含 数字和英文，长度6-32")
    private String password;
}
